package com.wz.common.bean;


import com.github.pagehelper.Page;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * <p>Project: wz_api - PageBean
 * <p>Powered by pisces On 2022-01-13 21:18:41
 * <P>Created by IntelliJ IDEA
 *
 * @author ww606851@163.com
 * @version 1.0
 * @description:
 * @since 8
 */

@Data
public class PageBean implements Serializable {

    int pageNum;
    int pageSize;
    long total;
    int pages;
    Object list;

    public PageBean(List list) {
        this.list = list;
        Page page = (Page) list;
        this.pageNum = page.getPageNum();
        this.pageSize = page.getPageSize();
        this.total = page.getTotal();
        this.pages = page.getPages();
    }

    public PageBean() {
    }
}
